package com.cyy.common.config.properties;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@Component
@ConfigurationProperties(prefix = "file")
public class FileProperties {

    @Schema(description = "本地文件地址")
    private String uploadPath;

    @Schema(description = "获取图片上传路径")
    private String imagePath;

    @Schema(description = "获取头像上传路径")
    private String avatarPath;

    @Schema(description = "获取文件上传路径")
    private String filePath;

    @Schema(description = "获取系统文件上传路径")
    private String systemPath;


    public String getImagePath() {
        return String.join("", uploadPath, imagePath);
    }

    public String getAvatarPath() {
        return String.join("", uploadPath, avatarPath);
    }

    public String getFilePath() {
        return String.join("", uploadPath, filePath);
    }

    public String getSystemPath() {
        return String.join("", uploadPath, systemPath);
    }
}
